From 3c0527712be0158c9a271c788c4e1c9c8aea95b2 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Mon, 8 Dec 2008 18:28:39 +0000 Subject: [PATCH] Don't just eek when an assertion fails, also say exactly what failed. * babl/babl-internal.h (babl_assert): Don't just eek when an assertion fails, also say exactly what failed. svn path=/trunk/; revision=359 --- ChangeLog | 5 +++++ babl/babl-internal.h | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49d41ad..d96a0cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-08 Martin Nordholts + + * babl/babl-internal.h (babl_assert): Don't just eek when an + assertion fails, also say exactly what failed. + 2008-11-16 Øyvind Kolås * babl/babl-fish-stats.c: (legal_error), (each_conv): show in red the diff --git a/babl/babl-internal.h b/babl/babl-internal.h index d2e6f82..661ac9e 100644 --- a/babl/babl-internal.h +++ b/babl/babl-internal.h @@ -167,12 +167,12 @@ real_babl_log (const char *file, while(0) -#define babl_assert(expr) do{ \ - if(!(expr)) \ - { \ - babl_fatal("Eeeeek"); \ - assert(expr); \ - } \ +#define babl_assert(expr) do{ \ + if(!(expr)) \ + { \ + babl_fatal("Eeeeek! Assertion failed: `" #expr "`"); \ + assert(expr); \ + } \ }while(0) /***** LOGGER (end)**/ -- 2.30.2